package com.diaosidadui.test02;

import com.domain.Student;
import org.w3c.dom.ls.LSOutput;

import java.util.Scanner;
//方法split
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Student st1 = new Student();
        String stuInfo = sc.nextLine();
        String[] strInfo = stuInfo.split(",");

        st1.setId(strInfo[0]);
        st1.setName(strInfo[1]);
        st1.setAge(strInfo[2]);
        st1.setYear(strInfo[3]);

        System.out.println(st1.getId());
        System.out.println(st1.getName());
        System.out.println(st1.getAge());
        System.out.println(st1.getYear());



    }
}
